<?php
session_start();
header("content-type:text/html; charset=utf-8");
require_once("../../utils/conn.php");

    $db = new mysql_db();
    $findFM="select focuser from focusme where familyNum='".$_SESSION['family_current']."'";
    $myFM=$db->data($findFM);
     if($myFM["total"]<=0){
         echo ($db->createJson(false,"","system error"));
     }else{
     $focusMe=array(); //array for foreach
     $focusMe=array(); //myforuser content
     if($myFM["data"][0]["myfocuser"]){
       $focusMe_data= explode("|",$myFM["data"][0]["focuser"]);
     }
      if($focusMe_data[0]==""){
          echo ($db->createJson(false,"","0"));
      }else{
        foreach ($focusMe_data as $value) {
                 $findMB="select * from member where nickname='".$value."'";
                 $memberInfo=$db->data($findMB);//$memberInfo 单个用户信息
                //$tagArr=$tagArr==""?"":json_encode($tagArr);
                foreach($memberInfo["data"] as $val){
                     $focusMe[]='{"familyNum":"'.$val["familyNum"].'","faceImg":"'.$val["faceImg"].'","nickname":"'.$val["nickname"].'"}';
                }
              }
               echo($db->createJson(true,json_encode($focusMe),"success"));
      }
     }
?>